<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增帮助')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-help-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">类别：</label>
            <div class="col-sm-8">
                <select name="categoryId" id="categoryId" class="form-control">
                    <option th:each="helpCategory:${cmsHelpCategoryList}" th:value="${helpCategory.id}"
                            th:text="${helpCategory.name}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">图片：</label>
            <div class="col-sm-8">
                <textarea name="icon" class="form-control"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">标题：</label>
            <div class="col-sm-8">
                <input name="title" class="form-control" type="text">
            </div>
        </div>
        <!--<div class="form-group">-->
        <!--<label class="col-sm-3 control-label">点击量：</label>-->
        <!--<div class="col-sm-8">-->
        <!--<input name="readCount" class="form-control" type="hidden" value="0">-->
        <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">内容：</label>
            <div class="col-sm-8">
                <input name="content" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">

    var prefix = ctx + "mall/cmsHelp"
    $("#form-help-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-help-add').serialize());
        }
    }

</script>
</body>
</html>